1. Field
The disclosure relates generally to a computer implemented method, a computer program product, and a data processing system for cache management, and more specifically, to freeing space from caches based on characteristics of memory devices associated with data stored in the caches.
2. Description of the Related Art
Cache management involves removing data associated with selected physical addresses and selected virtual addresses from their respective caches by one or more algorithms. Such algorithms may be called removal algorithms because they remove data to make room for a new data to be stored in the cache. Removal algorithms may also be referred to as eviction algorithms.
A processor needing to access data corresponding to a physical address, checks a cache table for the physical address. If the cache table does not contain the physical address, then the physical address is obtained, another physical address in the cache table is selected for removal, the selected physical address is removed from the table, and the physical address is placed in the cache table.
When a processor needs to access data corresponding to a virtual address, the processor looks into a translation lookaside buffer (TLB) for the virtual address. If the TLB has an entry for the virtual address, the physical address is read from TLB and the corresponding cache line is read. A processor may have multi-level TLBs and multi-level caches.
If an entry for the virtual address is not found in the TLB, then the physical address is obtained from memory, another virtual address associated with another physical address is selected for removal from the TLB, the virtual address is removed from the TLB, and the virtual address associated with the physical address is placed in the TLB.
Caches may reside in many different types of memory devices. Each type of memory device may have different characteristics. Furthermore, each physical or virtual addresses stored in a cache table may be associated with data stored in one or more types of memory devices. Each type of memory device may have a set of characteristics that are different from other types of memory devices. One or more characteristics of a type of memory device may affect system speed. Therefore, selection of addresses for eviction from a cache table may affect system speed.
Currently, removal algorithms do not take into account the type of memory devices in which the cached physical or virtual address is stored when selecting a virtual address or a physical address to be removed from a cache table to make room for the requested physical address or virtual address. Nor do current eviction algorithms take into account the type of memory device containing the data associated with the physical or virtual address when selecting a virtual address or a physical address to be removed to make room for the requested physical address or virtual address.
Therefore, it would be beneficial to have a method, apparatus, and computer program product that takes into account at least some of the issues discussed above, as well as possibly other issues.